home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / FGL304E.ZIP;1 / EXPAS.ARJ / FGDOC / EXAMPLES / PASCAL / 05-08.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1994-01-24  |  729 b   |  43 lines

  1. program main;
  2. uses fgmain, fgmisc;
  3.  
  4. const
  5.   WIDTH  : integer = 40;
  6.   COLORS : integer = 16;
  7.  
  8. var
  9.   base       : integer;
  10.   color      : integer;
  11.   minx, maxx : integer;
  12.   mode       : integer;
  13.  
  14. begin
  15.   mode := fg_getmode;
  16.   fg_setmode(16);
  17.  
  18.   base := 0;
  19.   minx := 0;
  20.   maxx := WIDTH - 1;
  21.  
  22.   for color := 0 to COLORS-1 do
  23.   begin
  24.      fg_palette(color,0);
  25.      fg_setcolor(color);
  26.      fg_rect(minx,maxx,0,349);
  27.      minx := maxx + 1;
  28.      maxx := maxx + WIDTH;
  29.   end;
  30.  
  31.   while (base < COLORS*4) do
  32.   begin
  33.      color := 0;
  34.      for color := 0 to COLORS-1 do
  35.         fg_palette(color,base+color);
  36.      base := base + COLORS;
  37.      fg_waitkey;
  38.   end;
  39.  
  40.   fg_setmode(mode);
  41.   fg_reset;
  42. end.
  43.